package com.ourteam.system.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Thu Jul 12 16:34:06 CST 2018
 * Auto Generate Date : 2018-07-20 12:04:42
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class SystemUser implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("account",
            com.ourteam.system.dao.ISysUserDAO.UserAccount);

        mappedDaoFields.put("id", com.ourteam.system.dao.ISysUserDAO.Id);

        mappedDaoFields.put("name", com.ourteam.system.dao.ISysUserDAO.UserName);

        mappedDaoFields.put("status", com.ourteam.system.dao.ISysUserDAO.Status);

        mappedDaoFields.put("type", com.ourteam.system.dao.ISysUserDAO.UserType);

        mappedDaoFields.put("remarks",
            com.ourteam.system.dao.ISysUserDAO.Remarks);

        mappedDaoFields.put("password",
            com.ourteam.system.dao.ISysUserDAO.Password);

        mappedDaoFields.put("lastLoginTime",
            com.ourteam.system.dao.ISysUserDAO.LastLoginTime);

        mappedDaoFields.put("mail", com.ourteam.system.dao.ISysUserDAO.UserMail);

        mappedDaoFields.put("code", com.ourteam.system.dao.ISysUserDAO.UserCode);

        mappedDaoFields.put("photoPath",
            com.ourteam.system.dao.ISysUserDAO.UserPhoto);

        mappedDaoFields.put("userMobilePhone",
            com.ourteam.system.dao.ISysUserDAO.UserMobilePhone);

        mappedDaoFields.put("userOfficePhone",
            com.ourteam.system.dao.ISysUserDAO.UserOfficePhone);

        mappedDaoFields.put("userDepartment",
            com.ourteam.system.dao.ISysUserDAO.UserDepartment);

        mappedDaoFields.put("userRole",
            com.ourteam.system.dao.ISysUserDAO.UserRole);

        mappedDaoFields.put("userDepartmentRole",
            com.ourteam.system.dao.ISysUserDAO.UserDepartmentRole);

        mappedDaoFields.put("modifyTime",
            com.ourteam.system.dao.ISysUserDAO.ModifyTime);

        mappedDaoFields.put("operatorId",
            com.ourteam.system.dao.ISysUserDAO.OperatorId);

        mappedDaoFields.put("operatorName",
            com.ourteam.system.dao.ISysUserDAO.OperatorName);

        mappedDaoFields.put("userStatus",
            com.ourteam.system.dao.ISysUserDAO.UserStatus);

        mappedDaoFields.put("createTime",
            com.ourteam.system.dao.ISysUserDAO.CreateTime);

        mappedDaoFields.put("seatCode",
            com.ourteam.system.dao.ISysUserDAO.SeatCode);

        mappedDaoFields.put("seatPassword",
            com.ourteam.system.dao.ISysUserDAO.SeatPassword);

        mappedDaoFields.put("wechatOpenId",
            com.ourteam.system.dao.ISysUserDAO.WechatOpenId);
    }

    private com.ourteam.system.dao.SysUser sysUser;

    public SystemUser() {
        super();

        this.sysUser = new com.ourteam.system.dao.SysUser();
    }

    public SystemUser(com.ourteam.system.dao.SysUser sysUser) {
        super();

        this.sysUser = sysUser;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(sysUser);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.system.dao.SysUser convertToSysUser() {
        return this.sysUser;
    }

    public com.ourteam.system.dao.SysUser convertTo() {
        return this.sysUser;
    }

    /**
     * Get account
     *
     * @return String
     */
    public String getAccount() {
        return (String) this.sysUser.getUserAccount();
    }

    /**
     * Set account
     *
     * @parameter String
     */
    public void setAccount(String account) {
        this.sysUser.setUserAccount(account);
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.sysUser.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.sysUser.setId(id);
    }

    /**
     * Get name
     *
     * @return String
     */
    public String getName() {
        return (String) this.sysUser.getUserName();
    }

    /**
     * Set name
     *
     * @parameter String
     */
    public void setName(String name) {
        this.sysUser.setUserName(name);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.sysUser.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.sysUser.setStatus(status);
    }

    /**
     * Get type
     *
     * @return String
     */
    public String getType() {
        return (String) this.sysUser.getUserType();
    }

    /**
     * Set type
     *
     * @parameter String
     */
    public void setType(String type) {
        this.sysUser.setUserType(type);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.sysUser.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.sysUser.setRemarks(remarks);
    }

    /**
     * Get password
     *
     * @return String
     */
    public String getPassword() {
        return (String) this.sysUser.getPassword();
    }

    /**
     * Set password
     *
     * @parameter String
     */
    public void setPassword(String password) {
        this.sysUser.setPassword(password);
    }

    /**
     * Get lastLoginTime
     *
     * @return java.util.Date
     */
    public java.util.Date getLastLoginTime() {
        return (java.util.Date) this.sysUser.getLastLoginTime();
    }

    /**
     * Set lastLoginTime
     *
     * @parameter java.util.Date
     */
    public void setLastLoginTime(java.util.Date lastLoginTime) {
        this.sysUser.setLastLoginTime(lastLoginTime);
    }

    /**
     * Get mail
     *
     * @return String
     */
    public String getMail() {
        return (String) this.sysUser.getUserMail();
    }

    /**
     * Set mail
     *
     * @parameter String
     */
    public void setMail(String mail) {
        this.sysUser.setUserMail(mail);
    }

    /**
     * Get code
     *
     * @return String
     */
    public String getCode() {
        return (String) this.sysUser.getUserCode();
    }

    /**
     * Set code
     *
     * @parameter String
     */
    public void setCode(String code) {
        this.sysUser.setUserCode(code);
    }

    /**
     * Get photoPath
     *
     * @return String
     */
    public String getPhotoPath() {
        return (String) this.sysUser.getUserPhoto();
    }

    /**
     * Set photoPath
     *
     * @parameter String
     */
    public void setPhotoPath(String photoPath) {
        this.sysUser.setUserPhoto(photoPath);
    }

    /**
     * Get userMobilePhone
     *
     * @return String
     */
    public String getUserMobilePhone() {
        return (String) this.sysUser.getUserMobilePhone();
    }

    /**
     * Set userMobilePhone
     *
     * @parameter String
     */
    public void setUserMobilePhone(String userMobilePhone) {
        this.sysUser.setUserMobilePhone(userMobilePhone);
    }

    /**
     * Get userOfficePhone
     *
     * @return String
     */
    public String getUserOfficePhone() {
        return (String) this.sysUser.getUserOfficePhone();
    }

    /**
     * Set userOfficePhone
     *
     * @parameter String
     */
    public void setUserOfficePhone(String userOfficePhone) {
        this.sysUser.setUserOfficePhone(userOfficePhone);
    }

    /**
     * Get userDepartment
     *
     * @return String
     */
    public String getUserDepartment() {
        return (String) this.sysUser.getUserDepartment();
    }

    /**
     * Set userDepartment
     *
     * @parameter String
     */
    public void setUserDepartment(String userDepartment) {
        this.sysUser.setUserDepartment(userDepartment);
    }

    /**
     * Get userRole
     *
     * @return String
     */
    public String getUserRole() {
        return (String) this.sysUser.getUserRole();
    }

    /**
     * Set userRole
     *
     * @parameter String
     */
    public void setUserRole(String userRole) {
        this.sysUser.setUserRole(userRole);
    }

    /**
     * Get userDepartmentRole
     *
     * @return String
     */
    public String getUserDepartmentRole() {
        return (String) this.sysUser.getUserDepartmentRole();
    }

    /**
     * Set userDepartmentRole
     *
     * @parameter String
     */
    public void setUserDepartmentRole(String userDepartmentRole) {
        this.sysUser.setUserDepartmentRole(userDepartmentRole);
    }

    /**
     * Get modifyTime
     *
     * @return java.util.Date
     */
    public java.util.Date getModifyTime() {
        return (java.util.Date) this.sysUser.getModifyTime();
    }

    /**
     * Set modifyTime
     *
     * @parameter java.util.Date
     */
    public void setModifyTime(java.util.Date modifyTime) {
        this.sysUser.setModifyTime(modifyTime);
    }

    /**
     * Get operatorId
     *
     * @return long
     */
    public long getOperatorId() {
        return (long) this.sysUser.getOperatorId();
    }

    /**
     * Set operatorId
     *
     * @parameter long
     */
    public void setOperatorId(long operatorId) {
        this.sysUser.setOperatorId(operatorId);
    }

    /**
     * Get operatorName
     *
     * @return String
     */
    public String getOperatorName() {
        return (String) this.sysUser.getOperatorName();
    }

    /**
     * Get userStatus
     *
     * @return String
     */
    public String getUserStatus() {
        return (String) this.sysUser.getUserStatus();
    }

    /**
     * Set userStatus
     *
     * @parameter String
     */
    public void setUserStatus(String userStatus) {
        this.sysUser.setUserStatus(userStatus);
    }

    /**
     * Get createTime
     *
     * @return java.util.Date
     */
    public java.util.Date getCreateTime() {
        return (java.util.Date) this.sysUser.getCreateTime();
    }

    /**
     * Set createTime
     *
     * @parameter java.util.Date
     */
    public void setCreateTime(java.util.Date createTime) {
        this.sysUser.setCreateTime(createTime);
    }

    /**
     * Get seatCode
     *
     * @return String
     */
    public String getSeatCode() {
        return (String) this.sysUser.getSeatCode();
    }

    /**
     * Set seatCode
     *
     * @parameter String
     */
    public void setSeatCode(String seatCode) {
        this.sysUser.setSeatCode(seatCode);
    }

    /**
     * Get seatPassword
     *
     * @return String
     */
    public String getSeatPassword() {
        return (String) this.sysUser.getSeatPassword();
    }

    /**
     * Set seatPassword
     *
     * @parameter String
     */
    public void setSeatPassword(String seatPassword) {
        this.sysUser.setSeatPassword(seatPassword);
    }

    /**
     * Get wechatOpenId
     *
     * @return String
     */
    public String getWechatOpenId() {
        return (String) this.sysUser.getWechatOpenId();
    }

    /**
     * Set wechatOpenId
     *
     * @parameter String
     */
    public void setWechatOpenId(String wechatOpenId) {
        this.sysUser.setWechatOpenId(wechatOpenId);
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof SystemUser) == false) {
            return false;
        } // end if

        SystemUser other = (SystemUser) obj;

        boolean isEqual = false;

        com.ourteam.system.dao.SysUser tempSysUser = other.convertToSysUser();

        if ((tempSysUser == null) || (this.sysUser == null)) {
            isEqual = false;
        } else if ((tempSysUser == this.sysUser) ||
                tempSysUser.equals(this.sysUser)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static SystemUser[] toArray(
        com.ourteam.system.dao.SysUser[] aSysUsers) {
        return toArray(aSysUsers, null);
    }

    public static SystemUser[] toArray(
        com.ourteam.system.dao.SysUser[] aSysUsers,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aSysUsers)) {
            return new SystemUser[0];
        }

        int length = aSysUsers.length;

        SystemUser[] beans = new SystemUser[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new SystemUser(aSysUsers[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i], new Object[] { aSysUsers[i] });
            }
        }

        return beans;
    }
}
